package auth_center.feignapi;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import user_center.user.pojo.SystemUser;

/**
 * @author Ezio.Auditore
 */
@FeignClient("userCenter")
public interface UserCenterApi {

    /**
     * 登录方法调用
     *
     * @param username
     * @param password
     * @return
     */
    @PostMapping("/api/user/login")
    String login(@RequestParam("username") String username, @RequestParam("password") String password);

    /**
     * 根据名称获取用户信息
     *
     * @param username
     * @return
     */
    @PostMapping("/api/user/getByName")
    SystemUser getByName(@RequestParam("username") String username);


}
